package com.example.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.web.client.RestTemplate;

@Configuration
@Import({JdbcConfig.class, MyBatisConfig.class})
@ComponentScan("com.example.service")
public class SpringConfig {
    //ssm整合之后，spring的配置信息写在此类中
    @Bean("restTemplate")
    public RestTemplate getRestTemplate(){
        RestTemplate restTemplate = new RestTemplate();
        return restTemplate;
    }
}

